package com.jinghua.treatment.controller;

import com.jinghua.treatment.common.GlobalConstant;
import com.jinghua.treatment.common.controller.BaseController;
import com.jinghua.treatment.common.domain.JSONResult;
import com.jinghua.treatment.common.exception.BizException;
import com.jinghua.treatment.entity.SysDoctor;
import com.jinghua.treatment.entity.SysMedicalInstitution;
import com.jinghua.treatment.entity.SysWechatAccount;
import com.jinghua.treatment.entity.vo.DoctorVO;
import com.jinghua.treatment.service.MedicalinsitutionService;
import com.jinghua.treatment.service.SysDoctorService;
import com.jinghua.treatment.service.SysWechatAccountService;
import com.jinghua.treatment.tools.StringUtil;
import com.jinghua.treatment.wechat.biz.SMSBiz;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

/**
 * 医疗机构
 */
@Controller
@RequestMapping("/d/medicalinsitution")
public class SysMedicalinstitutionController extends BaseController {

    @ApiOperation(value = "加载医疗机构")
    @RequestMapping(value = "/loadMedicalinsitution", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public JSONResult loadMedicalinsitution() {
       List<SysMedicalInstitution> result=  medicalinsitutionService.selectMedicalinsitutions();
       return jsonResult(GlobalConstant.SUCCESS_CODE,"ok",result);
    }


    @Resource
    private MedicalinsitutionService medicalinsitutionService;
}
